package base.render;
import java.util.Random;

public class CosineWiggle
{
	private Random rand;
	
	private float wiggle;
	private float wiggleSpeed = 0.06F;
	private float wiggleScale = 15F;
	
	public CosineWiggle(Random par1Random)
	{
		this.rand = par1Random;
		this.wiggle = rand.nextFloat();
	}
	
	public CosineWiggle setModifiedWiggle(float par1, float par2)
	{
		this.setSpeed(par1);
		this.setScale(par2);
		return this;
	}
	
	public float doTheWiggle()
	{
		this.wiggle += this.wiggleSpeed;
		return (float) (Math.cos(this.wiggle) * this.wiggleScale);
	}
	
	public void resetTheWiggle()
	{
		this.setWiggle(1.5F);
	}
	
	public float getWiggle()
	{
		return this.wiggle;
	}
	
	public void setWiggle(float par1)
	{
		this.wiggle = par1;
	}
	
	public float getSpeed()
	{
		return this.wiggleSpeed;
	}
	
	public void setSpeed(float par1)
	{
		this.wiggleSpeed = par1;
	}
	
	public float getScale()
	{
		return this.wiggleScale;
	}
	
	public void setScale(float par1)
	{
		this.wiggleScale = par1;
	}
}
